<script>
// function fn() {return 1}
// async function fn2() { return 1}
// Promise.resolve().then(() => 1)
// console.log(fn())
// console.log(fn2())
// const fn3 = async () => 1
// class A {
//   async fn() {}
// }
// new A().fn() // promise fulfilled: undefined

// async function fn4() { throw 2}
// fn4()
// async function fn5() { return Promise.reject(3)}
// fn5().catch(e => console.log(e))
// console.log('end')
console.log(1)
const fn = async () => {
  console.log(2)
  // 取ajax接口数据 3s
  const result = ajax(url)
  console.log(result)
  // ajax(url).then(() => {

  // })
}
fn()
console.log(3)


</script>